package com.workpaper.app.plan.actions;

import org.eclipse.jface.action.Action;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ResourceLocator;

import com.workpaper.app.cache.resource.ViewInfoCache;
import com.workpaper.app.consts.AppConsts;
import com.workpaper.app.consts.common.CommonViewConsts;
import com.workpaper.app.consts.resources.IconPath;
import com.workpaper.app.plan.view.DailyPlanManageView;
/**
 * 刷新计划列表
 * @author zyj
 *
 */
public class RefreshDailyPlanAction extends Action{
	
	private DailyPlanManageView viewPart;
	
	public RefreshDailyPlanAction(DailyPlanManageView view) {
		this(ViewInfoCache.get(CommonViewConsts.ButtonText_Refresh), 
				ResourceLocator.imageDescriptorFromBundle(AppConsts.APP_ID, IconPath.BtnIcon_refresh).get());
		this.viewPart = view;
	}


	public RefreshDailyPlanAction(String text, ImageDescriptor image) {
		super(text, image);
	}


//	public RefreshPlanAction(String text, int style) {
//		super(text, style);
//		// TODO Auto-generated constructor stub
//	}

	@Override
	public void run() {
		viewPart.refreshTableData();
		super.run();
	}
}
